import React,{PureComponent} from 'react'
import {ScrollView,Dimensions, StyleSheet, View, Text, TouchableOpacity, Button, Animated} from 'react-native'

const {width} = Dimensions.get('window')


type Props = {
    onPress:Function,
}


export default class MineShiXiaoCell extends PureComponent<Props>{
    render(){
        return (
            <View style={styles.container}>
                <TouchableOpacity onPress={()=>{this.props.onPress()}}>
                    <View style={{flexDirection:'row',alignItems:'center',marginTop:15}}>
                        <Text style={styles.text_show}>订单号:</Text>
                        <Text style={styles.text_data}>87459875123</Text>
                        <View style={{flex:1}}/>
                        <Text style={styles.text_show_right}>已失效</Text>
                    </View>
                    <View style={{backgroundColor:'rgba(0,0,0,0.1)',width: width -24,height:1,marginTop:15}}/>
                    <View style={{flexDirection:'row',alignItems:'center',marginTop:15}}>
                        <Text style={styles.text_show}>课程名称：</Text>
                        <Text style={styles.text_data}>非常记忆潜能开发提高班</Text>
                    </View>
                    <View style={{flexDirection:'row',alignItems:'center',marginTop:15}}>
                        <Text style={styles.text_show}>开课时间：</Text>
                        <Text style={styles.text_data}>2018-04-08 20:00</Text>
                    </View>
                    <View style={{flexDirection:'row',alignItems:'center',marginTop:15}}>
                        <Text style={styles.text_show}>授课老师：</Text>
                        <Text style={styles.text_data}>王进平</Text>
                        <View style={{flex:1}}/>
                        <Text style={styles.price_show}>530.00</Text>
                    </View>
                    <View style={{backgroundColor:'rgba(0,0,0,0.1)',width: width -24,height:1,marginTop:15}}/>
                    <View style={{flexDirection:'row',alignItems:'center',marginTop:15,marginBottom:11}}>
                        <View style={{flex:1}}/>
                        <TouchableOpacity style={{borderRadius:13,borderWidth:1,borderColor:'#C7C7C7',height:25,width:67,justifyContent:'center',alignItems:'center'}}>
                            <Text style={{color:'#C7C7C7',fontSize:13,fontWeight:'bold'}}>取消订单</Text>
                        </TouchableOpacity>
                        <TouchableOpacity style={{marginLeft:15,borderRadius:13,backgroundColor:'#DB3843',height:25,width:67,justifyContent:'center',alignItems:'center'}}>
                            <Text style={{color:'white',fontSize:12,}}>再次购买</Text>
                        </TouchableOpacity>
                    </View>
                </TouchableOpacity>
            </View>
        )
    }
}
const styles = StyleSheet.create({
    container:{
      backgroundColor:'white',
        paddingLeft:12,
        paddingRight:12,
    },
    text_show:{
       color:'rgba(0,0,0,0.5)',
        fontSize:12,
        fontWeight:'200',

    },
    text_data:{
        fontSize:13,
        color:'black',
        marginLeft:15,
    },
    text_show_right:{
        fontSize:13,
        color:'black',
    },
    price_show:{
        fontSize:20,
        color:'rgba(0,0,0,0.8)',
        fontWeight:'bold',
    },
})